from odoo import api, models, fields
from odoo.tools import date_utils


class nbd_contractrecord(models.Model):
    _name = 'nbd.contractrecord'
    _description = '合同记录'

    contract_code = fields.Char(string='合同号', max_length=20)
    contract_file_ids = fields.One2many(
        comodel_name='nbd.filemanager',
        inverse_name='id',
        domain=lambda self: [('res_model', '=', self._name)],
        string='附件'
    )
    task_id = fields.Many2one(
        comodel_name='project.task',
        string='taskid'
    )